package heima_bixiangdong.itcast;

public class TicketDemo {

    public static void main(String[] args) {
        // testTicket();
        testTicket_1();
    }

    private static void testTicket_1() {
        Ticket_1 ticket = new Ticket_1(100);
        Thread t1 = new Thread(ticket);
        Thread t2 = new Thread(ticket);
        Thread t3 = new Thread(ticket);
        Thread t4 = new Thread(ticket);

        t1.start();
        t2.start();
        t3.start();
        t4.start();
    }

    public static void testTicket(){
        Ticket ticket = new Ticket(100);
        Thread t1 = new Thread(ticket);
        Thread t2 = new Thread(ticket);
        Thread t3 = new Thread(ticket);
        Thread t4 = new Thread(ticket);

        t1.start();
        t2.start();
        t3.start();
        t4.start();
    }
}
